package com.netease.nie.service;

import java.util.Collections;
import java.util.List;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.netease.nie.dao.CreditHistoryDao;
import com.netease.nie.model.CreditHistory;

@Service
public class CreditHistoryServiceImpl implements CreditHistoryService {

	@Autowired
	private CreditHistoryDao creditHistoryDao;
	
	@Autowired
	private UserInfoService userInfoService;
	
	private Logger logger = Logger.getLogger(CreditHistoryServiceImpl.class);
	
	private static final int MAX_SIZE = 3;    // 只提供近3个月历史查询
	
	private static final int MIN_START_DATE = 20160824;

	public List<CreditHistory> queryCreditHistoryByUserId(long userId) {

		
		return Collections.emptyList();
	}

	public int insertCreditHistory(CreditHistory creditHistory) {
		try {
			return creditHistoryDao.insertCreditHistory(creditHistory);
		} catch (Exception e) {
			return 0;
		}
	}

}
